﻿using System.Collections.ObjectModel;
using System.Drawing.Printing;
using MeterReader.WPF.Models;

namespace MeterReader.WPF.Services
{
    public interface IDataService
    {
        /// <summary>
        /// 读取数据的状态
        /// </summary>
        bool IsWorking { get; }

        /// <summary>
        /// 开始读取数据
        /// </summary>
        void StartPeriodicRead();

        /// <summary>
        /// 停止读取数据
        /// </summary>
        void StopPeriodicRead();

        /// <summary>
        /// IsWorking 状态改变的事件
        /// </summary>
        event EventHandler WorkStatusChanged;

        /// <summary>
        /// 获取数据集合
        /// </summary>
        /// <returns>返回集合</returns>
        ObservableCollection<MeterDataCollection> GetMeterDataCollections();
    }
}
